package com.lantosec.hmrp.modules.eval.vo;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.Date;
import java.util.List;

import com.lantosec.hmrp.modules.eval.entity.EvalDetailed;
import com.lantosec.hmrp.core.mvc.BaseVO;
import com.lantosec.hmrp.modules.eval.entity.EvalTaskEvent;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * <p>
 * 考评明细 VO对象
 * </p>
 *
 * @author AutoCode
 * @since 2020-03-30
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value="EvalDetailed对象", description="考评明细")
public class EvalDetailedVO extends BaseVO<EvalDetailed> {
    private static final long serialVersionUID = 1L;


    public EvalDetailedVO(EvalDetailed entity){
        this.evalDetailedId = entity.getEvalDetailedId();
        this.evalTaskId = entity.getEvalTaskId();
        this.planTargetId = entity.getPlanTargetId();
        this.executorUserId = entity.getExecutorUserId();
        this.executorUser = entity.getExecutorUser();
        this.executorTime = entity.getExecutorTime();
        this.taskState = entity.getTaskState();
        this.submitTime = entity.getSubmitTime();
        this.currExecNum = entity.getCurrExecNum();
        this.planTotalScore = entity.getPlanTotalScore();
        this.planScore = entity.getPlanScore();
        this.planMoney = entity.getPlanMoney();
        this.evalStartPhoto = entity.getEvalStartPhoto();
        this.executorSignature = entity.getExecutorSignature();
        this.targetSignature = entity.getTargetSignature();
        this.evalSummary = entity.getEvalSummary();
    }

    @Override
    public EvalDetailed convertToEntity(){
        return new EvalDetailed(this);
    }


    @ApiModelProperty(value = "考评任务明细ID")
    private Integer evalDetailedId;

    @ApiModelProperty(value = "考评任务ID")
    private Integer evalTaskId;

    @ApiModelProperty(value = "考评对象ID")
    private Integer planTargetId;

    @ApiModelProperty(value = "执行者用户ID")
    private String executorUserId;

    @ApiModelProperty(value = "执行者")
    private String executorUser;

    @ApiModelProperty(value = "执行时间")
    private Date executorTime;

    @ApiModelProperty(value = "任务状态(0:初始化 1:保存 2:提交)")
    private Integer taskState;

    @ApiModelProperty(value = "提交时间")
    private Date submitTime;

    @ApiModelProperty(value = "当前周期内执行计数")
    private Integer currExecNum;

    @ApiModelProperty(value = "考评任务总分")
    private BigDecimal planTotalScore;

    @ApiModelProperty(value = "考评任务得分")
    private BigDecimal planScore;

    @ApiModelProperty(value = "奖惩总金额")
    private BigDecimal planMoney;

    @ApiModelProperty(value = "考评开始图片(upload表ID)")
    private String evalStartPhoto;

    @ApiModelProperty(value = "执行者签名")
    private String executorSignature;

    @ApiModelProperty(value = "考评对象签名")
    private String targetSignature;

    @ApiModelProperty(value = "考评总结")
    private String evalSummary;
    @ApiModelProperty(value = "任务名称")
    private String taskTitle;
    @ApiModelProperty(value = "考评对象为人员时的名称")
    private String name;
    @ApiModelProperty(value = "考评对象为部门时的名称")
    private String deptName;
    @ApiModelProperty(value = "考评对象为岗位时的名称")
    private String positionName;
    @ApiModelProperty(value = "考评计划")
    private Integer evalPlanId;
    @ApiModelProperty(value = "考评项目列表")
    private List<EvalDetailedItemVO> evalDetailedItemVOList;
    @ApiModelProperty(value = "状态")
    private Integer state;
    @ApiModelProperty(value = "考评对象事件列表")
    private List<EvalTaskEvent> evalTaskEventList;
    @ApiModelProperty(value = "考评对象考评图片路径")
    private String savePath;
}
